<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class FollowPlanTemplateLibMessage extends Model
{
    protected $table = "c_follow_plan_template_lib_messages";

    public function template()
    {
        return $this->belongsTo('App\Models\FollowPlanTemplateLib', "template_lib_id");
    }

    /**
     *获取模板信息
     */
    public function getMessages($template_lib_id)
    {
        return $this->where([['template_lib_id', '=', $template_lib_id]])->get()->toArray();
    }
}
